import myTable from '@/components/myTable'
import DynTable from '@/components/DynTable'
import DynForm from '@/components/DynForm'
import Pagination from '@/components/Pagination'
import InfoCard from '@/components/InfoCard'
import UploadBtn from '@/components/UploadBtn'
const semiUi = {}
const COMPONENT = [myTable, Pagination, DynTable, InfoCard, DynForm, UploadBtn]
semiUi.install = function(Vue, options) {
  if (options && options.components) {
    const components = options.components
    components.forEach(components => {
      COMPONENT.forEach(COMPONENT => {
        if (COMPONENT.name === components) {
          Vue.component(COMPONENT.name, COMPONENT)
        }
      })
    })
  } else {
    COMPONENT.forEach(ele => {
      Vue.component(ele.name, ele)
    })
  }
}
export default semiUi
